package com.xhwl.centiotdata.pushtrigger.alarm;

import com.xhwl.centiotdata.handler.alarm.impl.AlarmHuaWeiH1800Handler;
import com.xhwl.centiotdata.handler.alarm.impl.AlarmHuaWeiH3800Handler;
import com.xhwl.common.pojo.ResultJson;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author Leon
 * @Description: TODO
 * @Date: 2022/5/16 9:39
 */
@RestController
@RequestMapping("/")
@Slf4j
public class HuaweiH1800AlarmController {

    @Autowired
    AlarmHuaWeiH1800Handler alarmHuaWeiH1800Handler;

    @PostMapping("/h1800ivs/ivscallback/{rowId}")
    public ResultJson huaweiH1800AlarmReceive(@RequestBody String body, @PathVariable("rowId") Integer rowId){
        return alarmHuaWeiH1800Handler.huaWeiH1800Receive(body, rowId);
    }

    @PostMapping("/ivs1800/intelligence-subscribe/{rowId}")
    public ResultJson huaweiH1800IntelligenceReceive(@RequestBody String body, @PathVariable("rowId") Integer rowId){
        return alarmHuaWeiH1800Handler.huaweiH1800IntelligenceReceive(body, rowId);
    }
}
